<?php

class PaymentReplaceAmazon extends PaymentProcess {
	
	public function saveSelectAmazon(){
		
		$model = new Compensate();
		$model->auction_id 	= $this->auction->id;
		if ($this->getPaymentInfo()->existence('buyItNow')) {
			$model->order_id		= $this->buyItNow->id;;
		}else{
			$model->order_id		= $this->orderInfo->id;
		}
		$model->customer_id		= $this->customer->id;
		$model->product_id		= $this->amazoncard->amazoncardId;
		$model->created			= time();
		$model->modified		= time();
		$model->notes			= null;
		$model->enable			= ConstService::ENABLE;

		$model->save();

		return $this;
	}

}